﻿using System;
using System.Collections;
using System.Collections.Generic;
using System.Data;
using System.Diagnostics;
using System.Web;
using System.ServiceModel;
using System.Runtime.Serialization;

namespace BBECServiceBusAdapter
{
    [DataContract(Name="ConstituentUpdate", Namespace=Helper.Namespace)]
    public sealed class ConstituentDataUpdateContract
    {
        #region Data Members

        [DataMember(IsRequired=false)]
        public string LastOrOrganizationName = "";
        [DataMember(IsRequired=false)]
        public string FirstName = "";
        [DataMember(IsRequired=false)]
        public string MiddleName = "";
        [DataMember(IsRequired=false)]
        public string MaidenName = "";
        [DataMember(IsRequired=false)]
        public string Nickname = "";
        [DataMember(IsRequired=true)]
        public string LookupID = "";
        [DataMember(IsRequired=false)]
        public List<ConstituentDataContractExtensions.AlternateIDData> AlternateIDs;
        [DataMember(IsRequired=false)]
        public List<ConstituentDataContractExtensions.ConstituencyData> Constituencies;
        [DataMember(IsRequired=false)]
        public List<ConstituentDataContractExtensions.SolicitCodeData> SolicitCodes;
        [DataMember(IsRequired=false)]
        public List<ConstituentDataContractExtensions.CommunicationPreferenceData> CommunicationPreferences;
        [DataMember(IsRequired=false)]
        public List<ConstituentDataContractExtensions.RelationshipData> Relationships;
        [DataMember(IsRequired=false)]
        public List<ConstituentDataContractExtensions.AddressData> Addresses;
        [DataMember(IsRequired=false)]
        public List<ConstituentDataContractExtensions.PhoneData> Phones;
        [DataMember(IsRequired=false)]
        public List<ConstituentDataContractExtensions.EmailData> EmailAddresses;
        [DataMember(IsRequired=false)]
        public string WebAddress = "";
        // these are organization-specific fields
        [DataMember(IsRequired=false)]
        public string ParentOrganizationID = "";    // Should accept GUID, Lookup ID, or Alternate ID
        [DataMember(IsRequired=false)]
        public string Industry = "";
        [DataMember(IsRequired=false)]
        public int NumberOfEmployees = 0;
        [DataMember(IsRequired=false)]
        public int NumberOfSubsidiaries = 0;
        // end organization-specific fields
        [DataMember(IsRequired=false)]
        public string Title1 = "";
        [DataMember(IsRequired=false)]
        public string Title2 = "";
        [DataMember(IsRequired=false)]
        public string Suffix1 = "";
        [DataMember(IsRequired=false)]
        public string Suffix2 = "";
        [DataMember(IsRequired=false)]
        public ConstituentDataContractExtensions.ConstituentGenderType Gender = ConstituentDataContractExtensions.ConstituentGenderType.Unknown;
        [DataMember(IsRequired=false)]
        public DateTime? Birthdate;
        [DataMember(IsRequired=false)]
        public bool IsInactive = false;
        [DataMember(IsRequired=false)]
        public string MaritalStatus = "";
        [DataMember(IsRequired=false)]
        public int DuplicateThreshhold = 80;
        [DataMember(IsRequired=false)]
        public bool UpdateOnDuplicate = false;
        [DataMember(IsRequired=false)]
        public List<RevenueDataAddContract> Revenue;

        #endregion
    }
}